<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>xiarikui管理后台</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/Public/bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/Public/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <link href="/Public/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
    <link href="/Public/plugins/iCheck/flat/blue.css" rel="stylesheet" type="text/css" />
    <link href="/Public/Admin/css/unify.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="/Public/images/favicon.ico" type="image/x-icon" />
    <script src="/Public/js/jQuery-2.1.4.min.js"></script>
    <script src="/Public/js/global.js"></script>
    <script src="/Public/js/myFormValidate.js"></script>
    <script src="/Public/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/Public/js/layer/layer-min.js"></script>
    <script src="/Public/js/myAjax.js"></script>
    <script type="text/javascript">
    function delfunc(obj) {
        layer.confirm('确认删除？', {
            btn: ['确定', '取消']
        }, function() {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {
                    act: 'del',
                    del_id: $(obj).attr('data-id')
                },
                dataType: 'json',
                success: function(data) {
                    if (data == 1) {
                        layer.msg('操作成功', {
                            icon: 1
                        });
                        $(obj).parent().parent().remove();
                    } else {
                        layer.msg(data, {
                            icon: 2,
                            time: 2000
                        });
                    }
                    layer.closeAll();
                }
            });
        }, function(index) {
            layer.close(index);
            return false;
        });
    }

    //全选
    function selectAll(name, obj) {
        $('input[name*=' + name + ']').prop('checked', $(obj).checked);
    }

    function get_help(obj) {
        layer.open({
            type: 2,
            title: '',
            shadeClose: true,
            shade: 0.3,
            area: ['90%', '90%'],
            content: $(obj).attr('data-url')
        });
    }

    function delAll(obj, name) {
        var a = [];
        $('input[name*=' + name + ']').each(function(i, o) {
            if ($(o).is(':checked')) {
                a.push($(o).val());
            }
        });
        if (a.length == 0) {
            layer.alert('请选择删除项', {
                icon: 2
            });
            return;
        }
        layer.confirm('确认删除？', {
            btn: ['确定', '取消']
        }, function() {
            $.ajax({
                type: 'get',
                url: $(obj).attr('data-url'),
                data: {
                    act: 'del',
                    del_id: a
                },
                dataType: 'json',
                success: function(data) {
                    if (data == 1) {
                        layer.msg('操作成功', {
                            icon: 1
                        });
                        $('input[name*=' + name + ']').each(function(i, o) {
                            if ($(o).is(':checked')) {
                                $(o).parent().parent().remove();
                            }
                        });
                    } else {
                        layer.msg(data, {
                            icon: 2,
                            time: 2000
                        });
                    }
                    layer.closeAll();
                }
            });
        }, function(index) {
            layer.close(index);
            return false;
        });
    }
    </script>
    <style type="text/css">
        .table > thead:first-child > tr:first-child > th{
            border-bottom: 0 none;
        } 
    </style>
</head>

<body>

<link rel="stylesheet" type="text/css" href="/Public/Admin/css/stylesheet.css">
<div class="wrapper">
    <div class="breadcrumbs" id="breadcrumbs">
    <ol class="breadcrumb">
        <?php if(is_array($navigate_admin)): foreach($navigate_admin as $k=>$v): ?><li><?php echo ($k); ?></li><?php endforeach; endif; ?>
    </ol>
</div>

    <section class="content">
        <div class="row">
            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="tile">
                    <div class="tile-heading">提问数</div>
                    <div class="tile-body">
                        <i class="fa fa-bell"></i>
                        <h2 class="pull-right"><?php echo ($count["total_question"]); ?></h2>
                    </div>
                    <div class="tile-footer">
                        <a href="<?php echo U('Admin/Order/index');?>">查看更多</a>
                    </div>
                </div>
            </div>

            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="tile">
                    <div class="tile-heading">回答数</div>
                    <div class="tile-body">
                        <i class="fa fa-bell"></i>
                        <h2 class="pull-right"><?php echo ($count["total_answer"]); ?></h2>
                    </div>
                    <div class="tile-footer">
                        <a href="<?php echo U('Admin/Order/index');?>">查看更多</a>
                    </div>
                </div>
            </div>

            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="tile">
                    <div class="tile-heading">会员总数</div>
                    <div class="tile-body">
                        <i class="fa fa-user-plus"></i>
                        <h2 class="pull-right"><?php echo ($count["users"]); ?></h2>
                    </div>
                    <div class="tile-footer">
                        <a href="<?php echo U('Admin/User/index');?>">查看更多</a>
                    </div>
                </div>
            </div>

            <div class="col-lg-3 col-md-3 col-sm-6">
                <div class="tile">
                    <div class="tile-heading">会计师总数</div>
                    <div class="tile-body">
                        <i class="fa fa-user-plus"></i>
                        <h2 class="pull-right"><?php echo ($count["total_acc"]); ?></h2>
                    </div>
                    <div class="tile-footer">
                        <a href="<?php echo U('Admin/User/index');?>">查看更多</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header">
                        <h3 class="box-title">今日统计</h3>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-3 col-xs-6">
                                新增问题：<?php echo ($count["today_question"]); ?>
                            </div>
                            <div class="col-sm-3 col-xs-6">
                                今日回答：<?php echo ($count["today_answer"]); ?>
                            </div>
                            <div class="col-sm-3 col-xs-6">
                                新增会员：<?php echo ($count["new_users"]); ?>
                            </div>
                            <div class="col-sm-3 col-xs-6">
                                新增会计师：<?php echo ($count["today_accountant"]); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>

</html>